﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WcfContrib.Extensions.Caching
{
    /// <summary>
    /// Represents implementation for a provider for output caching
    /// </summary>
    public interface IOutputCacheProvider
    {
        /// <summary>
        /// Adds the item to the provider.
        /// </summary>
        /// <param name="key">The item key.</param>
        /// <param name="interval">The cache interval.</param>
        /// <param name="value">The value.</param>
        void AddItem(OutputCacheItemKey key, OutputCacheInterval interval, object value);

        /// <summary>
        /// Tries to get the item from the provider.
        /// </summary>
        /// <param name="key">The item key.</param>
        /// <param name="value">The value.</param>
        /// <returns>true if the item was found; otherwise, false</returns>
        bool TryGetItem(OutputCacheItemKey key, out object value);
    }
}
